package card;

import java.util.Scanner;

import place.Landindex;

public class BarricadeCard extends CardSystem {
	//路障卡；
	String name="BarricadeCard";
	String function="可以在前后8步之内安放一个路障，任意玩家经过路障时会停在路障所在位置不能前行";	
	String type="ToolCard";
	String range="无";
	BarricadeCard(){
		int point=30;
		this.point=point;
	}	
	@Override
	public int getPoint() {
		return point;
	}
	@Override
	public String getName() {
		
		return name;
	}

	@Override
	public String getFunction() {
		// TODO Auto-generated method stub
		return function;
	}

	@Override
	public String getType() {
		// TODO Auto-generated method stub
		return type;
}

	@Override
	public String getRange() {
		// TODO Auto-generated method stub
		return range;
	}
	@Override
	public void print(int location, int namei) {
		// TODO Auto-generated method stub
		System.out.println("请选择在何处安放路障，向后安放用负数");
		Scanner in=new Scanner(System.in);
		int inner=in.nextInt();
		if(inner<=8&&inner>=-8){
		Landindex.mark[location+inner].state=false;
		System.out.println("路障安放成功");
		System.out.println("卡牌使用成功");
		}else{
		System.out.println("距离过大，安放失败");
		System.out.println("卡牌被浪费了！");
		}
	}
}
